package cn.wolfcode.luowowo.common.util;

import cn.wolfcode.luowowo.common.exception.LoginException;

public class AssertUtil {

    public static void hasLength(String value, String msg){
        if(value == null || "".equals(value.trim())){
            throw new LoginException(msg);
        }
    }

    public static void isEquals(String v1, String v2, String msg){
        if(v1 == null || v2 == null){
            throw new LoginException("比较参数不能为null");
        }
        if(!v1.equals(v2)){
            throw new LoginException(msg);
        }
    }
}
